package KNNCalculate;

import java.util.*;

public class featureSelect extends IG {
    public static final int N=6;
	private static final String[] AnswerListNo = null;
	private static final String[] AnswerListYes = null;
    public static ArrayList<String> features=new ArrayList<String>();
    public static AnswerList anList=new AnswerList();;
    public static IG build_IG=new IG();

    public static ArrayList<String> FS(){
        anList.extractMatrix(AnswerListNo,AnswerListYes);
        build_IG.IG_Cal(anList.wordfreq);
        ArrayList<Map.Entry<String,Double>> list=build_IG.sort(build_IG.map);
        Iterator<Map.Entry<String,Double>> iter=list.iterator();
        int index=0;
        while(index++<N && iter.hasNext()){
            Map.Entry<String,Double> entry=iter.next();
            //System.out.println(entry.getKey()+"  "+entry.getValue());
            features.add(entry.getKey());
        }
        return features;
    }

	public static ArrayList<String> FS1() {
		// TODO Auto-generated method stub
		return null;
	}



}
